From: mwilli2@equilibrium.research.intel-research.net Date: Mon, 28 Jun 2004 17:42:07 +0000 (+0000) Subject: bitkeeper revision 1.1011.3.1 (40e0586fjTiPMS5QT6pzPb5uZe0MMw) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~18095^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=3af7269ca3cd9bc9d17002eef1aeff81a6fbef1f;p=xen.git bitkeeper revision 1.1011.3.1 (40e0586fjTiPMS5QT6pzPb5uZe0MMw) Various xentrace tweaks. Should perform better now. May still need more work. Let me know if you have problems with it. --- diff --git a/tools/xentrace/formats b/tools/xentrace/formats index 9a5b157f47..0452385484 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -1,17 +1,17 @@ -#0x00010000 CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x) [ dom id = 0x%(1)x%(2)08x ] -#0x00010001 CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x) [ dom id = 0x%(1)x%(2)08x ] -#0x00010002 CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x) [ dom id = 0x%(1)x%(2)08x ] -#0x00010003 CPU%(cpu)d %(tsc).6f do_block() [ current = 0x%(2)08x ] -#0x00010004 CPU%(cpu)d %(tsc).6f do_yield() [ current = %(2)08x ] -#0x00010005 CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x) [ current = 0x%(3)08x ] -#0x00010006 CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x) -#0x00010007 CPU%(cpu)d %(tsc).6f sched_adjdom(params) [ dom id = 0x%(1)x%(2)08x ] -#0x00010008 CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x) [ dom id = 0x%(1)x%(2)08x ] -#0x00010009 CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x [ dom id = 0x%(1)x ] -#0x0001000A CPU%(cpu)d %(tsc).6f s_timer_fn(unused) -#0x0001000B CPU%(cpu)d %(tsc).6f t_timer_fn(unused) -#0x0001000C CPU%(cpu)d %(tsc).6f dom_timer_fn(data) -#0x0001000D CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused) +0x00010000 CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x) [ dom id = 0x%(2)08x ] +0x00010001 CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x) [ dom id = 0x%(2)08x ] +0x00010002 CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x) [ dom id = 0x%(2)08x ] +0x00010003 CPU%(cpu)d %(tsc).6f do_block() [ current = 0x%(2)08x ] +0x00010004 CPU%(cpu)d %(tsc).6f do_yield() [ current = %(2)08x ] +0x00010005 CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x) [ current = 0x%(3)08x ] +0x00010006 CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x) +0x00010007 CPU%(cpu)d %(tsc).6f sched_adjdom(params) [ dom id = 0x%(2)08x ] +0x00010008 CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x) [ dom id = 0x(2)08x ] +0x00010009 CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x [ dom id = 0x%(1)x ] +0x0001000A CPU%(cpu)d %(tsc).6f s_timer_fn(unused) +0x0001000B CPU%(cpu)d %(tsc).6f t_timer_fn(unused) +0x0001000C CPU%(cpu)d %(tsc).6f dom_timer_fn(data) +0x0001000D CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused) 0x00020008 CPU%(cpu)d %(tsc).6f enter: dom0_create_dom ( ) diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index dae9b67d80..3560745a42 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -311,7 +311,7 @@ int monitor_tbufs(FILE *logfile) /* printf("XX%d: cons=%ld head=%ld %p\n", i, cons[i], meta[i]->head, data[i] + (cons[i] % size_in_recs) ); */ - while( cons[i] < meta[i]->head ) + while( cons[i] != meta[i]->head ) { /* if( (cons[i] % 6 ) == 0 ) diff --git a/xen/common/kernel.c b/xen/common/kernel.c index a4d3fa75df..74cc115d31 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -59,7 +59,7 @@ int opt_watchdog=0; /* opt_pdb: Name of serial port for Xen pervasive debugger (and enable pdb) */ unsigned char opt_pdb[10] = "none"; /* opt_tbuf_size: trace buffer size (in pages) */ -unsigned int opt_tbuf_size = 1; +unsigned int opt_tbuf_size = 10; /* opt_sched: scheduler - default to Borrowed Virtual Time */ char opt_sched[10] = "bvt"; /* opt_physdev_dom0_hide: list of PCI slots to hide from domain 0. */ diff --git a/xen/common/schedule.c b/xen/common/schedule.c index b54c0efc45..5c2ca1579a 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -58,9 +58,6 @@ #define TRC_SCHED_DOM_TIMER_FN 0x0001000C #define TRC_SCHED_FALLBACK_TIMER_FN 0x0001000D -#define _HIGH32(_x) (_x >> 32) -#define _LOW32(_x) ((u32)_x ) - /* Various timer handlers. */ static void s_timer_fn(unsigned long unused); static void t_timer_fn(unsigned long unused); @@ -147,14 +144,14 @@ void sched_add_domain(struct domain *d) SCHED_OP(add_task, d); - TRACE_3D(TRC_SCHED_DOM_ADD, _HIGH32(d->domain), _LOW32(d->domain), d); + TRACE_2D(TRC_SCHED_DOM_ADD, d->domain, d); } void sched_rem_domain(struct domain *d) { rem_ac_timer(&d->timer); SCHED_OP(rem_task, d); - TRACE_3D(TRC_SCHED_DOM_REM, _HIGH32(d->domain), _LOW32(d->domain), d); + TRACE_2D(TRC_SCHED_DOM_REM, d->domain, d); } void init_idle_task(void) @@ -207,7 +204,7 @@ void domain_wake(struct domain *d) if ( likely(domain_runnable(d)) && likely(!__task_on_runqueue(d)) ) { - TRACE_3D(TRC_SCHED_WAKE, _HIGH32(d->domain), _LOW32(d->domain), d); + TRACE_2D(TRC_SCHED_WAKE,d->domain, d); SCHED_OP(wake_up, d); #ifdef WAKE_HISTO p->wokenup = NOW(); @@ -296,8 +293,7 @@ long do_set_timer_op(unsigned long timeout_hi, unsigned long timeout_lo) add_ac_timer(&p->timer); } - TRACE_5D(TRC_SCHED_SET_TIMER, _HIGH32(p->domain), _LOW32(p->domain), - p, timeout_hi, timeout_lo); + TRACE_4D(TRC_SCHED_SET_TIMER, p->domain, p, timeout_hi, timeout_lo); return 0; } @@ -335,7 +331,7 @@ long sched_adjdom(struct sched_adjdom_cmd *cmd) if( p == NULL ) return -ESRCH; - TRACE_2D(TRC_SCHED_ADJDOM, _HIGH32(p->domain), _LOW32(p->domain)); + TRACE_1D(TRC_SCHED_ADJDOM, p->domain); SCHED_OP(adjdom, p, cmd); diff --git a/xen/include/xen/trace.h b/xen/include/xen/trace.h index 782023f76e..3064c47a0b 100644 --- a/xen/include/xen/trace.h +++ b/xen/include/xen/trace.h @@ -80,7 +80,7 @@ static inline int trace(u32 event, u32 d1, u32 d2, u32 d3, u32 d4, u32 d5) buf->head_ptr++; buf->head++; - if ( buf->head_ptr == (buf->vdata + (buf->size-1)) ) + if ( buf->head_ptr == (buf->vdata + buf->size) ) buf->head_ptr = buf->vdata; local_irq_restore(flags);